package pojo;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

/**
 * 
 * @author zgy
 * 
 */
@Repository
public class ZcItem implements RowMapper<ZcItem>, Serializable {

	private Integer id;
	private String name;
	private Double price;
	private String description;
	private String code;
	private String creatTime;
	private String url;
	private String week;
	//自定义字段
	private String sellTime;
	private boolean sell;
	private Integer sellCount;

	

	public ZcItem() {
		super();
		// TODO Auto-generated constructor stub
	}


	public ZcItem(Integer id, String name, Double price, String description,
			String code, String creatTime, String url, String week,
			String sellTime, boolean sell, Integer sellCount) {
		super();
		this.id = id;
		this.name = name;
		this.price = price;
		this.description = description;
		this.code = code;
		this.creatTime = creatTime;
		this.url = url;
		this.week = week;
		this.sellTime = sellTime;
		this.sell = sell;
		this.sellCount = sellCount;
	}






	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCreatTime() {
		return creatTime;
	}

	public void setCreatTime(String creatTime) {
		this.creatTime = creatTime;
	}

	public String getWeek() {
		return week;
	}

	public void setWeek(String week) {
		this.week = week;
	}
	
	public String getUrl() {
		return url;
	}
	
	public void setUrl(String url) {
		this.url = url;
	}
	

	public String getSellTime() {
		return sellTime;
	}

	public void setSellTime(String sellTime) {
		this.sellTime = sellTime;
	}


	public boolean isSell() {
		return sell;
	}

	public void setSell(boolean sell) {
		this.sell = sell;
	}

	public Integer getSellCount() {
		return sellCount;
	}

	public void setSellCount(Integer sellCount) {
		this.sellCount = sellCount;
	}
	




	@Override
	public ZcItem mapRow(ResultSet rs, int rowNum) throws SQLException {
		ZcItem e = new ZcItem();
		e.setId(rs.getInt("id"));
		e.setName(rs.getString("name"));
		e.setPrice(rs.getDouble("price"));
		e.setWeek(rs.getString("week"));
		return e;
	}	

}
